function [ electrodes ] = GetRegionElectrodes( subject, region )
%GETREGIONELECTRODES
% [electrodes] = GetRegionElectrodes(subject, region)

if ~(nargin==2); help GetRegionElectrodes; error('Incorrect number of arguments'); end;

global Database;

cSubject = strcmp(Database.regions_header, subject);
if ~any(cSubject); error(['Subject ''' subject ''' not found']); end

rRegion = strcmp(Database.regions, region);
if ~any(rRegion); error(['Region ''' region ''' not found']); end

electrodes = sort(unique(Database.regions{rRegion, cSubject}));

end

